package org.gten.gegedexin.controller;

import org.gten.gegedexin.service.CollectMail;
import org.gten.gegedexin.service.ReadMailList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MailController {
    @Autowired
    CollectMail collectMail;
    @Autowired
    ReadMailList readMailList;
    @PostMapping("/setCollect")
    public void setCollect(String mailID){
        collectMail.setCol(mailID);
        readMailList.readList(readMailList.getUser());
    }
}
